package com.p595263720.o_amap.map.models;

import com.amap.api.maps.AMap;
import com.amap.api.maps.UiSettings;


public class UnifiedUiSettings {
    /// 是否允许显示缩放按钮
    private boolean isZoomControlsEnabled;
    /// 设置缩放按钮的位置
    private int zoomPosition;
    /// 指南针
    private boolean isCompassEnabled;
    /// 定位按钮
    private boolean isMyLocationButtonEnabled;
    /// 比例尺控件
    private boolean isScaleControlsEnabled;
    /// 地图Logo
    private int logoPosition;
    /// 缩放手势
    private boolean isZoomGesturesEnabled;
    /// 滑动手势
    private boolean isScrollGesturesEnabled;
    /// 旋转手势
    private boolean isRotateGesturesEnabled;
    /// 倾斜手势
    private boolean isTiltGesturesEnabled;

    public void applyTo(AMap map) {
        UiSettings uiSettings = map.getUiSettings();
        uiSettings.setZoomControlsEnabled(isZoomControlsEnabled);
        uiSettings.setZoomPosition(zoomPosition);
        uiSettings.setCompassEnabled(isCompassEnabled);
        uiSettings.setMyLocationButtonEnabled(isMyLocationButtonEnabled);
        uiSettings.setScaleControlsEnabled(isScaleControlsEnabled);
        uiSettings.setLogoPosition(logoPosition);
        uiSettings.setZoomGesturesEnabled(isZoomGesturesEnabled);
        uiSettings.setScrollGesturesEnabled(isZoomGesturesEnabled);
        uiSettings.setRotateGesturesEnabled(isRotateGesturesEnabled);
        uiSettings.setTiltGesturesEnabled(isTiltGesturesEnabled);
    }
}

